<?php
session_start(); 
include_once "config.php";

include_once "connect.php";
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>AP3-SP-les phoques du desert</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<script type="text/javascript" src="verification.js"></script>	
</head>
<body onLoad="display_c()">

<div id="all">
		<div id="header">	
			<a href="index.php"> Retour vers l'Index </a>
			<div id="image">
			</div>
			
			<div id="barre_choix">
			</div>
			
			<div id="log">
			</div>
		</div>
		
		<div id="content">		
			<?
			if(isset($_SESSION["user"])){?>
				<form name="ajoutreponse" action="ajoutreponse.php?id_post=<?php echo $_GET["id_post"];?>" method="post" onSubmit="return validForm();">
				<p>
					<label>Nouvelle Reponse</label><br/>
					<p>
						<label>Titre</label>
						<input name="titrereponse"/>
					</p>
					<p>	
						<textarea name="contenu" cols="50" rows="10"></textarea>
					</p>
					
					<p>
						<label>Pseudo</label>
						<?php echo $_GET["id_user"]; ?>
					</p>
					
					<p>
						<label>Rubrique</label>
										<?php	
							$libelle=mysql_query("select libelle_rubrique from AP3_SP_rubrique where id_rubrique=".$_GET["id"]);
							while($row=mysql_fetch_assoc($libelle))	{
							echo $row["libelle_rubrique"];
							}
							
						?>
					</p>
					<p>
						<input type="submit" name="ajoutreponse" value="Répondre"/><br/>
					</p>
					</form>
				<?}?>
		
			</div>
			<div id="footer">
				<div id="ct">
				</div>
				
				<div id="droit">
				Made by Les Phoques Du Désert
				</div>
			</div>
	</div>
</body>
</html>